package com.example.demo.design.demo14_observer;

/**
 * Created by 蔡超 on 2018/10/4.
 */
public class Client {
    public static void main(String[] args) {
        SecretarySubject secretarySubject = new SecretarySubject();
        NBAObserver nbaObserver = new NBAObserver();
        StockObserver stockObserver = new StockObserver();
        secretarySubject.attach(nbaObserver);
        secretarySubject.attach(stockObserver);
        secretarySubject.sendMsg();

        BossSubjcet bossSubjcet = new BossSubjcet();
        NBAObserver nbaObserver1 = new NBAObserver();
        StockObserver stockObserver1 = new StockObserver();
        bossSubjcet.attach(nbaObserver1);
        bossSubjcet.attach(stockObserver1);
        bossSubjcet.sendMsg();

    }
}
